<div class="menu_account">
    <ul>
        <li><span class="tab"><?php echo CHtml::link('Your Account', array("user/index")); ?></span></li>
        <li class="active"><span class="tab"><?php echo CHtml::link('Update Account', array("user/updateAccount")); ?></span></li>
        <li><span class="tab"><?php echo CHtml::link('Order(s) History', array("user/orderHistory")); ?></span></li>
    </ul>
</div>
<div style="padding: 5px 0;">
    <h2>Your Address</h2>
    <?php
    if (isset(Yii::app()->user->id)) {
        $uid = Yii::app()->user->id;
        $user = User::model()->findByPk($uid);
        $address = UserAddress::model()->findByAttributes(array('uid' => $uid));
        $country = Countries::model()->findByAttributes(array("countryCode" => $address['countryCode']));
    }
    ?>
    <div>
        <p class="info-myaccount-display">
            <?php echo $user['display_name']; ?>, 
            <?php echo $address['street']; ?> 
            <?php echo $address['city']; ?>, 
            <?php echo $country['countryName']; ?>
        </p>
        <p>Phone : <?php echo $address['phone']; ?></p>
    </div>
    <p><?php echo CHtml::link('Change', array('user/updateAddress'), array('class' => 'buttonSubmit')); ?></p>
</div>

<div style="padding: 5px 0;">
    <h2>Your Password</h2>
    <p><?php echo CHtml::link('Change', array('user/changePass'), array('class' => 'buttonSubmit')); ?></p>
</div>

<div style="padding: 5px 0;">
    <h2>Your Email</h2>
    <?= $user->email ?>
    <p><?php echo CHtml::link('Change', array('user/updateEmail'), array('class' => 'buttonSubmit')); ?></p>
</div>

